# 商品分类数量序列化器
from rest_framework import serializers

from apps.goods.models import GoodsVisitCount


class GoodSerializer(serializers.ModelSerializer):
    category = serializers.StringRelatedField(read_only=True)
    class Meta:
        model = GoodsVisitCount
        fields = ['count', 'category']